package com.zyf.chapter02.behavior.memento.v1;

/**
 * 输入的文本
 * @author yifeng
 */
public class InputText {
    private StringBuilder text = new StringBuilder();

    public String getText() {
        return text.toString();
    }

    public void append(String input) {
        text.append(input);
    }

    public void setText(String text) {
        this.text.replace(0, this.text.length(), text);
    }

    @Override
    public String toString() {
        return text.toString();
    }
}